﻿SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
GO
CREATE TABLE dbo.bht_PayU_PaymentType
	(
	PaymentKey nvarchar(10) NOT NULL,
	MinimumChargeValue numeric(10, 2) NOT NULL,
	MaximumChargeValue numeric(10, 2) NOT NULL,
	AutoCancelDays int NOT NULL,
	[Description] nvarchar(400) NOT NULL
	)  ON [PRIMARY]
GO
ALTER TABLE dbo.bht_PayU_PaymentType ADD CONSTRAINT
	PK_bht_PayU_PaymentType PRIMARY KEY CLUSTERED 
	(
	PaymentKey
	) ON [PRIMARY]

GO
INSERT INTO bht_PayU_PaymentType VALUES ('no_def',0, 0, 0, 'Brak zdefiniowanej formy płatności')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('m',0.50, 999999.99, 10, 'mTransfer - mBank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('n',0.50, 999999.99, 10, 'MultiTransfer - MultiBank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('w',0.50, 7000, 10, 'BZWBK - Przelew24')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('o',0.50, 999999.99, 10, 'Pekao24Przelew - Bank Pekao')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('i',0.50, 999999.99, 10, 'Płacę z Inteligo')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('d',0.50, 999999.99, 10, 'Płać z Nordea')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('p',0.50, 999999.99, 10, 'Płać z iPKO')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('h',0.50, 999999.99, 10, 'Płać z BPH')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('g',0.50, 999999.99, 10, 'Płać z ING')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('l',0.50, 999999.99, 10, 'Credit Agricole')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('u',0.50, 999999.99, 10, 'Eurobank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('me',0.50, 999999.99, 10, 'Meritum Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('ab',0.50, 999999.99, 10, 'Płacę z Alior Bankiem')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wp',0.50, 999999.99, 10, 'Przelew z Polbank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wm',0.50, 999999.99, 10, 'Przelew z Millennium')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wk',0.50, 999999.99, 10, 'Przelew z Kredyt Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wg',0.50, 999999.99, 10, 'Przelew z BGŻ')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wd',0.50, 999999.99, 10, 'Przelew z Deutsche Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wr',0.50, 999999.99, 10, 'Przelew z Raiffeisen Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wc',0.50, 999999.99, 10, 'Przelew z Citibank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wn',0.50, 999999.99, 10, 'Przelew z Invest Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wi',0.50, 999999.99, 10, 'Przelew z Getin Bank')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('wy',0.50, 999999.99, 10, 'Przelew z Bankiem Pocztowym')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('c',1.01, 7000, 5, 'Karta kredytowa')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('b',0.50, 999999.99, 10, 'Przelew bankowy')
GO
INSERT INTO bht_PayU_PaymentType VALUES ('t',0.50, 1000, 1, 'Płatność testowa - zostanie wyświetlony formularz, w którym można bezpośrednio zmienić status transakcji')
GO

CREATE PROCEDURE [dbo].[bhp_PayU_PaymentTypeGet] (
	@PaymentKey	NVARCHAR(10)
)
AS
BEGIN
	SELECT
		PaymentKey,
		MinimumChargeValue,
		MaximumChargeValue,
		AutoCancelDays,
		[Description]
	FROM
		bht_PayU_PaymentType
	WHERE 
		PaymentKey = @PaymentKey
END
